package com.dt76.smallloanbackenduser.remote.zjs;




import com.dt76.smallloanbackenduser.hystrix.zjs.UserRemoteHystrix;
import com.dt76.smallloanbackenduser.pojo.zjs.User;
import com.dt76.smallloanbackenduser.utils.Page;
import com.dt76.smallloanbackenduser.utils.Result;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
@FeignClient(name = "smallloan-backend-service",fallback = UserRemoteHystrix.class)
public interface UserRemote {

    @RequestMapping("/zjs/User")
    public List<User> qryAllUser();

    @RequestMapping("/zjs/qryPageUserAll")
    public Page qryPageAllUser(@RequestParam("pageIndex") int pageIndex,
                                    @RequestParam("queryname") String queryname,
                                    @RequestParam("userId") int userId,
                                    @RequestParam("queryTime") String queryTime
    );

    @RequestMapping("/zjs/delUser")
    public Result delUser(@RequestParam("userId") int userId);

}
